package com.hirain.observer;

/**
 * Created by caicf on 2016/8/28.
 */
public class TestObserver {
    public static void main(String[] args) {
        ISubject subject=new Hunt();

        IObserver observer1=new FxdObserver();
        IObserver observer2=new CcfObserver();

        subject.add(observer1);
        subject.add(observer2);

        subject.notifyAllObserver();

        System.out.println("=========================================");
        subject.remove(observer2);

        subject.notifyAllObserver();

    }
}
